{% load thumbnail i18n %}

{% for clipboard in user.filer_clipboards.all %}

    <div class="span3">
<table>
    <thead>
        <tr><th colspan="3">{% trans "Clipboard" %}</th></tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="3">
                <form action="{% url 'admin:filer-paste_clipboard_to_folder' %}" method="post" style="display: inline;">
                    {% csrf_token %}
                    <input type="hidden" name="folder_id" value="{{ folder.id }}" />
                    <input type="hidden" name="clipboard_id" value="{{ clipboard.id }}" />
                    <input type="hidden" name="redirect_to" value="{{ current_url }}" />
                    {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
                    {% if select_folder %}<input type="hidden" name="select_folder" value="1" />{% endif %}
                    <button class="btn btn-default btn-xs" type="submit"{% if folder.is_root or not permissions.has_add_children_permission %} disabled="disabled" style="color: gray;"{% endif %} title="{% trans "Paste all items here" %}">&lArr;</button>
                </form>
                <form action="{% url 'admin:filer-discard_clipboard' %}" method="post"  style="display: inline;">{% csrf_token %}
                    <input type="hidden" name="clipboard_id" value="{{ clipboard.id }}" />
                    <input type="hidden" name="redirect_to" value="{{ current_url }}" />
                    {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
                    {% if select_folder %}<input type="hidden" name="select_folder" value="1" />{% endif %}
                    <button class="btn btn-default btn-xs" type="submit" title="{% trans "Move all clipboard files to" %} '{% trans "unfiled files" %}' {% trans "folder" %}">{% trans "discard" %}</button>
                </form>{% comment %}
                <form action="{% url 'admin:filer-delete_clipboard' %}" method="post"  style="display: inline;">{% csrf_token %}
                    <input type="hidden" name="clipboard_id" value="{{ clipboard.id }}" />
                    <input type="hidden" name="redirect_to" value="{{ current_url }}" />
                    {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
                    <button class="btn btn-default btn-xs" type="submit" title="{% trans "Delete all files in the clipboard" %}">{% trans "delete files" %}</button>
                </form>{% endcomment %}
            </td>
        </tr>
    </tfoot>
    <tbody id="fileInputQueue" class="fileUploadQueue">{% if clipboard.files.count %}{% with clipboard.files.all as items %}
        {% include "admin/filer/tools/clipboard/clipboard_item_rows.html" %}
        {% endwith %}
    {% else %}
        <tr class="noItemsRow">
            <td colspan="3" style="color: gray;text-align: center; height: 48px; vertical-align: middle;">{% trans "the clipboard is empty" %}</td>
        </tr>
    {% endif %}
    </tbody>
</table>
</div>
{% endfor %}
